﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TelerikAcademyOopProject
{
    public class Account
    {
        /*==========================================*/
        //           Account  FIELDS
        /*==========================================*/
				
        private decimal balance;

        /*==========================================*/
        //           Account  PROPERTIES
        /*==========================================*/

        public decimal Balance
        {
            get { return balance; }
            set { balance = value; }
        }

        /*==========================================*/
        //           Account  CONSTRUCTOR
        /*==========================================*/

        public Account()
        {
            this.Balance = 0;
        }

        public Account(decimal b)
        {
            this.Balance = b;
        }

        /*==========================================*/
        //           Account  METHODS
        /*==========================================*/

        public void setMoney(decimal priceSize)
        {
            this.Balance = priceSize;
        }

        public void getMoney(decimal priceSize)
        {
            if (this.Balance < priceSize)
            {
                throw new StockException("You do nott have enouf money");
            }
            else
            {
                this.Balance = this.Balance - priceSize;
            }
        }

        //TODO Create ad Add Curreny Changer
        //public decimal changeCurrencyType(decimal priceSize, CurrencyEnumerator curencyType)
        //{
        //}

    }
}
